package com.sinosoft.perfect.system._authorization.dao;

import java.sql.SQLException;
import java.util.List;

import com.sinosoft.perfect.system._.po.TUserRolebusinessRelation;

public interface IUserRolebusinessAuthorizeDao {
	
	public void insertByTUserRolebusinessRelation(TUserRolebusinessRelation tuserRolebusinessRelation) throws SQLException;
	
	public List<TUserRolebusinessRelation> queryRolebusinessOfUser(String userId) throws SQLException;
	
	public List<String> queryUserIdsOfUnit(String unitId) throws SQLException;
	
	public int deleteRolebusinessRelationsByUser(String userId) throws SQLException;
	
	public int deleteRolebusinessRelationsByUsersOfUnit(String unitId) throws SQLException;
	
	public void delAllRolesOfUserAndAddUserRoles(String userId, List<TUserRolebusinessRelation> tuserRolebusinessRelations) throws SQLException;
	
	public void delAllRoleUsersOfUnitAndAddUsersRoleOfUnit(String unitId, List<TUserRolebusinessRelation> tuserRolebusinessRelations) throws SQLException;
	
	public void deleteTUserRolebusinessRelation(TUserRolebusinessRelation tUserRolebusinessRelation) throws SQLException;
}
